package com.echartsdata.Entityimp;

import com.alibaba.fastjson2.JSONObject;
import com.echartsdata.Mapper.Data2Mapper;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

//接口实现类
@Component
public class Data2Mapperimp {
    @Resource
    private Data2Mapper data2Mapper;
    public String Get_list(){
        System.out.println("看看接口数据返回的什么数据"+data2Mapper.Getlist());
        //返回json数据
        JSONObject json = new JSONObject();
        json.put("data", data2Mapper.Getlist());
        System.out.println("看看转化后的json数据"+json.toString());
        return json.toJSONString();
    }
}
